package com.young.coderule.common.enums;

/**
 * @DESCRIPTION: 默认段间分隔符：1-空, 2--, 3-@, 4-#, 5-$, 6-%, 7-^, 8-&amp;, 9-*, 10-_, 11-.
 * @USER: Young
 * @DATE: 2022/7/29 12:10
 */
public enum SignTypeEnum {
    Empty(1,""),
    Line(2,"-"),
    At(3,"@"),
    Pound(4,"#"),
    Dollar(5,"$"),
    Percent(6,"%"),
    Caret(7,"^"),
    And(8,"&"),
    Asterisk(9,"*"),
    UnderLine(10,"_"),
    Dot(11,".");


    private int code;

    private String value;

    public static String getSign(Integer splitSign) {
        if(null == splitSign){
            return "";
        }
        for(SignTypeEnum e: SignTypeEnum.values()){
            if(e.getCode()==splitSign){
                return e.getValue();
            }
        }
        return null;
    }

    SignTypeEnum(int code, String value) {
        this.code = code;
        this.value = value;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
